{include file="public/top_and_left"}

<section class="Hui-article-box">
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页
        <span class="c-gray en">&gt;</span>
        资讯分类管理
    </nav>
    <div class="Hui-article">
        <article class="cl pd-20">
            <div class="cl pd-5 bg-1 bk-gray mt-20">
				<span class="l">
				<a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"> 批量删除</a>
				<a class="btn btn-primary radius" data-title="添加资讯" href="{:url('news/group_add')}"> 添加资讯分类</a>
				</span>
                <span class="r">共有分类：<strong>54</strong> 条</span>
            </div>
            <div class="mt-20">
                <table class="table table-border table-bordered table-bg table-hover table-sort">
                    <thead>
                    <tr class="text-c">
                        <th width="25"><input type="checkbox" name="" value=""></th>
                        <th width="80">ID</th>
                        <th width="120">分类名称</th>
                        <th width="80">添加时间</th>
                        <th width="120">更新时间</th>
                        <th width="120">操作</th>
                    </tr>
                    </thead>
                    <tbody id="data">

                    {volist name="data" id='v'}
                    <tr class="text-c">
                        <td><input type="checkbox" value="" name=""></td>
                        <td>{$v['id']}</td>
                        <td>{$v['title']}</td>
                        <td>{$v['addtime']|date="Y-m-d H:i",###}</td>
                        <td>{$v['upda']}</td>
                        <td class="f-14 td-manage">
                            <a style="text-decoration:none" class="ml-5"
                               href="{:url('news/group_edit',array('id'=>$v['id']))}">编辑</a>
                            <a style="text-decoration:none" class="ml-5" onClick="del({$v['id']})" href="javascript:;"
                               title="删除">删除</a></td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
            </div>
        </article>
        <div id="page">{$page}</div>
    </div>


</section>
<script>
    //点击删除
    function del(id) {
        layer.confirm('您确定要删除吗？', {
            btn: ['确定', '取消'] //按钮
        }, function () {
            $.post("{:url('news/group_delete')}", {id: id}, function (data) {
                layer.msg(data.mes);
                if (data.status == 200) {
                    window.location.reload();
                }
            })
        }, function () {
        });
    }
    //点击分页
    function group(page) {
        $.get("{:url('news/group_append')}", {page: page}, function (data) {
            $("#data").empty();
            $("#page").empty();
            $("#data").append(data.data);
            $("#page").append(data.page);
            $("#active_"+page).addClass('active_now').siblings().removeClass('active_now');
        });
    }
</script>

{include file="public/foot"}